3.3.74 \(\int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [274]

Optimal. Leaf size=42 \[ \frac {\text {ArcTan}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \]

[Out]

1/2*arctan(sinh(d*x+c))/a/d+1/2*I/d/(a+I*a*sinh(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2746, 46, 212} \begin {gather*} \frac {\text {ArcTan}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]/(a + I*a*Sinh[c + d*x]),x]

[Out]

ArcTan[Sinh[c + d*x]]/(2*a*d) + (I/2)/(d*(a + I*a*Sinh[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {(i a) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^2} \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=-\frac {(i a) \text {Subst}\left (\int \left (\frac {1}{2 a (a+x)^2}+\frac {1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=\frac {i}{2 d (a+i a \sinh (c+d x))}-\frac {i \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \sinh (c+d x)\right )}{2 d}\\ &=\frac {\tan ^{-1}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 30, normalized size = 0.71 \begin {gather*} \frac {\text {ArcTan}(\sinh (c+d x))+\frac {1}{-i+\sinh (c+d x)}}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]/(a + I*a*Sinh[c + d*x]),x]

[Out]

(ArcTan[Sinh[c + d*x]] + (-I + Sinh[c + d*x])^(-1))/(2*a*d)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (36 ) = 72\).
time = 1.22, size = 75, normalized size = 1.79

method result size
risch \(\frac {{\mathrm e}^{d x +c}}{\left ({\mathrm e}^{d x +c}-i\right )^{2} d a}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 a d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 a d}\) \(64\)
derivativedivides \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) \(75\)
default \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) \(75\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/d/a*(1/4*I*ln(tanh(1/2*d*x+1/2*c)+I)-1/2*I/(-I+tanh(1/2*d*x+1/2*c))^2-1/4*I*ln(-I+tanh(1/2*d*x+1/2*c))-1/2/(
-I+tanh(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (34) = 68\).
time = 0.26, size = 87, normalized size = 2.07 \begin {gather*} -\frac {2 \, e^{\left (-d x - c\right )}}{-2 \, {\left (-2 i \, a e^{\left (-d x - c\right )} - a e^{\left (-2 \, d x - 2 \, c\right )} + a\right )} d} - \frac {i \, \log \left (e^{\left (-d x - c\right )} + i\right )}{2 \, a d} + \frac {i \, \log \left (i \, e^{\left (-d x - c\right )} + 1\right )}{2 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

-2*e^(-d*x - c)/((4*I*a*e^(-d*x - c) + 2*a*e^(-2*d*x - 2*c) - 2*a)*d) - 1/2*I*log(e^(-d*x - c) + I)/(a*d) + 1/
2*I*log(I*e^(-d*x - c) + 1)/(a*d)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (34) = 68\).
time = 0.37, size = 102, normalized size = 2.43 \begin {gather*} \frac {{\left (i \, e^{\left (2 \, d x + 2 \, c\right )} + 2 \, e^{\left (d x + c\right )} - i\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + {\left (-i \, e^{\left (2 \, d x + 2 \, c\right )} - 2 \, e^{\left (d x + c\right )} + i\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 2 \, e^{\left (d x + c\right )}}{2 \, {\left (a d e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d e^{\left (d x + c\right )} - a d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((I*e^(2*d*x + 2*c) + 2*e^(d*x + c) - I)*log(e^(d*x + c) + I) + (-I*e^(2*d*x + 2*c) - 2*e^(d*x + c) + I)*l
og(e^(d*x + c) - I) + 2*e^(d*x + c))/(a*d*e^(2*d*x + 2*c) - 2*I*a*d*e^(d*x + c) - a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\operatorname {sech}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x)

[Out]

-I*Integral(sech(c + d*x)/(sinh(c + d*x) - I), x)/a

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (34) = 68\).
time = 0.44, size = 104, normalized size = 2.48 \begin {gather*} -\frac {\frac {i \, \log \left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}{a} - \frac {i \, \log \left (i \, e^{\left (d x + c\right )} - i \, e^{\left (-d x - c\right )} - 2\right )}{a} + \frac {-i \, e^{\left (d x + c\right )} + i \, e^{\left (-d x - c\right )} - 6}{a {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(I*log(e^(d*x + c) - e^(-d*x - c) - 2*I)/a - I*log(I*e^(d*x + c) - I*e^(-d*x - c) - 2)/a + (-I*e^(d*x + c
) + I*e^(-d*x - c) - 6)/(a*(e^(d*x + c) - e^(-d*x - c) - 2*I)))/d

________________________________________________________________________________________

Mupad [B]
time = 1.10, size = 74, normalized size = 1.76 \begin {gather*} \frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {a^2\,d^2}}{a\,d}\right )}{\sqrt {a^2\,d^2}}+\frac {1}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{a\,d\,{\left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(c + d*x)*(a + a*sinh(c + d*x)*1i)),x)

[Out]

atan((exp(d*x)*exp(c)*(a^2*d^2)^(1/2))/(a*d))/(a^2*d^2)^(1/2) + 1/(a*d*(exp(c + d*x) - 1i)) - 1i/(a*d*(exp(c +
 d*x)*1i + 1)^2)

________________________________________________________________________________________